/*
 * 我的个人信息中点击发动机号跳转进来
 * 
 * 发动机号
 * */
package com.shanghaionstar.mro;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.RelativeLayout;

import com.onstar.cn.framework.annotation.FindViewById;
import com.onstar.cn.weight.TopLayout;
import com.shanghaionstar.R;

public class MrOInfoCarEngine extends MrOBaseFragment {
	private View view;
	@FindViewById
	private TopLayout top_layout;
	@FindViewById(background = R.drawable.mro_bg_vin_556x77)
	private RelativeLayout relayout_bg_vin;
	@FindViewById(background = R.drawable.mro_login_selector)
	private Button btn_login;
	private MrOActivity mroActivity;
	@FindViewById(background = R.drawable.onstar_join_me_bg)
	private RelativeLayout layout_background;
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		if (view == null) {
			view = inflater.inflate(R.layout.mro_fadjcar, container, false);
			injectView(view);
		} else {
			super.onResumeView(view);
		}
		return view;
	}

	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onActivityCreated(savedInstanceState);
//		top_layout = (TopLayout) view.findViewById(R.id.top_layout);
		top_layout.setLeftButtonClickListener(new OnClickListener() {
			@Override
			public void onClick(View arg0) {
				mroActivity.fragmentManager.popBackStack();
			}
		});
		initview();
	}

	private void initview() {
		mroActivity = (MrOActivity) getActivity();
//		view.findViewById(R.id.layout_background).setBackground(getResources().getDrawable(R.drawable.join_me_bg));
	}

	@Override
	public void onDestroy() {
		// TODO Auto-generated method stub
		super.onDestroy();
		view = null;
	}

}
